﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using BidPreparation.constant;
using BidPreparation.dto;
using BidPreparation.model;

namespace BidPreparation
{
    public partial class FormLogin : Form
    {
        public FormLogin()
        {
            InitializeComponent();
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            if (txtUserAccount.Text == "admin" && txtUserPassword.Text == "1111")
            {
                var userInfo = UserInfo.Instance;
                userInfo.UserNo = "admin";
                userInfo.UserName = "招投标1";
                userInfo.UserType = "0";

                this.DialogResult= DialogResult.OK;
            }
            else
            {
                MessageBox.Show(CommonConst.ACCOUNT_PWD_NOT_CORRECT,CommonConst.MESSAGE_BOX_TITLE,MessageBoxButtons.OK);
            }
        }
    }
}
